home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / archvrs / msdos / looz212.zoo / looz.doc next >
Encoding:
Text File  |  1987-08-08  |  13.4 KB  |  361 lines

  1.                Looz 2.1 -- Ooz with List
  2.                  (and Execute)
  3.                        a
  4.                  Zoo Extractor/Lister
  5.                       by
  6.                   Rahul Dhesi
  7.  
  8.  
  9. Looz 2.1 is a Zoo archive extractor/lister/tester for computer systems
  10. running MS-DOS version 2.x or greater.  IBM-compatibility is not a
  11. requirement.
  12.  
  13. Looz 2.1 does not recognize all the advanced features available in current
  14. Zoo archives, such as long filenames and directory names.  All extracted files
  15. go into the current directory.  It can, however, extract and list all archives
  16. created by all currently-existing versions of Zoo.
  17.  
  18. Looz can also give the directory listing of one or more Zoo archives
  19. (optionally showing attached comments) or test their integrity.
  20.  
  21. Looz 2.1 is different from version 1.10 in the following ways:  (a) It can 
  22. execute archived files;  (b) It can present a fast columnized listing of the
  23. contents of a zoo archive.
  24.  
  25. A detailed feature summary of Looz 2.1 is near the end of this document.
  26.  
  27.  
  28.                 COMMAND SUMMARY
  29.  
  30. The command format is:
  31.  
  32.      looz {lxt}[cpxf] archive[.zoo] [ file ... ] [ parameter ... ]
  33.  
  34. Choose one of the command characters `l', `x', or `t', and optionally a
  35. modifier `c', `p', or `x'.  These characters are case-sensitive.  Looz ignores
  36. any inappropriate modifier.  The valid combinations are:
  37.  
  38.      l     list contents of archive(s)
  39.      lc    list contents of archive(s) and show attached comments
  40.      lf    list contents of archive(s) in fast multicolumn format
  41.      x     extract file(s) from archive(s)
  42.      xp    extract file(s) from archive(s), pipe to standard output
  43.      xx    extract and execute file from archive
  44.      t     test integrity of archive(s)
  45.  
  46. The usual wildcard characters are accepted in both the archive name and in the
  47. specified filenames:  ? stands for any one character and * stands for any
  48. sequence of zero or more characters.  In addition, any filespec preceded by
  49. the character ^ excludes matching files.  The ^ exclusion character overrides
  50. any other matches.  (Note:  ^ works only in filenames, not in the archive
  51. name.  Also, ^ is ineffective when looking for files to execute via the xx
  52. command.)
  53.  
  54. Wildcard matching is case-insensitive.
  55.  
  56. Files extracted by `x' always go into the current directory;  however, if an
  57. extracted file is being executed, it is extracted directly into main memory
  58. and never stored on disk.
  59.  
  60. The information listed by `l' is:  The original length in bytes of the
  61. archived file;  the percentage by which its size decreased due to compression
  62. (also known as "CF" or "compression factor");  its current size as stored in
  63. the archive; its date and timestamps, preserved when archived;  the character
  64. "C" if the file has an attached comment;  the character "D" if it is a deleted
  65. file;  and an MS-DOS format filename.  
  66.  
  67. If appropriate, a "GRAND TOTAL" line summarizes statistics for all archives
  68. and files that were listed.
  69.  
  70. When the xx command is used, the archive name and the file name may be
  71. followed by parameters to be supplied to the program being executed.
  72.  
  73.  
  74.                 FILE EXECUTION
  75.  
  76. Looz can extract and execute archived COM and EXE programs.  BAT programs are
  77. not currently supported.  A file to be executed must not be longer than 65535
  78. bytes.
  79.  
  80. DISK AND MEMORY CONSIDERATIONS
  81.  
  82. When executing an archived program, Looz itself needs about 60 kilobytes to
  83. perform the extraction, and enough additional memory to hold the extracted
  84. program.  Thus if the executable program is 30 kilobytes long, there must be
  85. about 90 kilobytes available.
  86.  
  87. However, before giving control to the program being executed, Looz removes
  88. itself from memory.  Thus there is no space penalty for executing an archived
  89. file via Looz.
  90.  
  91. Looz extracts the program to be executed directly into memory.  Thus there is
  92. no need to create any temporary disk files at any time.  Looz will therefore
  93. execute archived programs with all disks write-protected.
  94.  
  95. I/O REDIRECTION
  96.  
  97. When executing archived files, I/O redirection can be used normally.  For
  98. example,
  99.  
  100.      looz xx \bin\run sdir \bin\*.* >>dir.lst
  101.  
  102. will append the output of the command to the file dir.lst, exactly as would
  103. the direct execution of sdir via the command:
  104.  
  105.      sdir \bin\*.* >>dir.lst
  106.      
  107. Pipes can also be used normally.  For example:
  108.  
  109.      looz xx \bin\run sdir | list /s
  110.  
  111. The above command will extract and execute sdir.com from the archive
  112. \bin\run.zoo, and feed its output to list.com.  In this case, list.com must be
  113. found on disk.  However, if list.com is also in the zoo archive, the following
  114. pipeline will work:
  115.  
  116.      looz xx \bin\run sdir | looz xx \bin\run list /s
  117.  
  118. USAGE HINTS FOR ARCHIVED PROGRAMS
  119.  
  120. A good way of avoiding disk fragmentation is to combine many small executable
  121. programs into a single zoo archive.  Programs that are used only occasionally
  122. can be stored in compressed form.  Programs that are frequently used should be
  123. stored uncompressed so they may be executed without any uncompression delay.
  124.  
  125. It is also possible to put executable files into multiple zoo archives, and to
  126. specify the archive name with a wildcard.  Looz will search all matching
  127. archive names for the specified executable file, and execute the first
  128. matching file found.  There may, however, be a delay of a second or so while
  129. Looz searches for the archives on disk.
  130.  
  131. Another good way of using Looz to execute archived files is via a CED
  132. synonym.  CED is a public domain program written by Chris Dunford and is
  133. available from bulletin boards.  (Note that while Looz will run on any MS-DOS
  134. system, CED requires an IBM-compatible computer system.)  With CED installed
  135. on your system, create a CED synonym by giving a command as follows:
  136.  
  137.      ced syn run looz xx \bin\run
  138.  
  139. This creates a new command "run" that is equivalent to typing 
  140. "looz xx \bin\run".  Executable programs may now be put in the zoo archive
  141. \bin\run.zoo.  Now any program in this archive can be extracted and executed
  142. by giving the command "run program".  For example, if \bin\run.zoo contains
  143. the program sdir.com, you can now run it by typing "run sdir" at the MS-DOS
  144. prompt.  Parameters can be supplied as usual, so typing "run sdir \doc\*.*"
  145. will execute the archived copy of sdir.com exactly as if you had typed 
  146. "sdir \doc\*.*" to MS-DOS.
  147.  
  148.  
  149.                    FILE EXTENSIONS
  150.  
  151. Looz assumes default file extensions as follows.
  152.  
  153. If no file extension is specified for the name of the archive, an extension of
  154. .zoo is assumed.
  155.  
  156. No assumptions are made about the extension of a file to be extracted, with
  157. one exception:  If the xx command is being used to extract and execute an
  158. archived file, Looz looks for files with extensions .com and .exe and executes
  159. the first file found whose name matches.  Thus, for example, the command
  160.  
  161.      looz xx \bin\programs *
  162.  
  163. searches the archive \bin\programs.zoo for any file matching *.com or *.exe
  164. executes the first such file found.   Similarly the command
  165.  
  166.      looz xx \bin\programs show
  167.  
  168. extracts and executes a file called show.com or show.exe.  If the archive
  169. contains both show.com and show.exe, the first one encountered is executed.
  170.  
  171. A program name specified for execution must not be typed with an extension.
  172. Thus "looz xx \bin\programs show.com" will not work.
  173.  
  174.  
  175.                                    EXAMPLES
  176.  
  177. The command
  178.      
  179.      looz l *r *a?b* *x* z*y  ^*.c
  180.  
  181. will list all archives with filenames ending with `r' and with the extension
  182. ".zoo".  Within these archives, the only files that will be listed are:  
  183. (a) those with names containing the characters `a' and `b' separated by any
  184. one character; (b) those with names containing the character `x'; (c) those
  185. with names beginning with `z' and ending with `y'.  Note that since the dot is
  186. not special, the filespec "*x*" will match the names "xyz.doc", "yxz", and
  187. "doc.yzx".  Regardless of the above, however, the pattern "^*.c" excludes all
  188. files matching "*.c" so they will not be listed;  thus "xyz.c" is excluded by
  189. "^*.c", even though it matches "*x*".
  190.  
  191. The command
  192.  
  193.      looz lc *r *a?b* *x* z*y ^*.c
  194.  
  195. is identical to the above but it will also show any comments attached to
  196. archived files.
  197.  
  198. The command
  199.  
  200.      looz lf *r *a?b* *x* z*y ^*.c
  201.  
  202. is identical to the above but it will list filenames in five columns,
  203. allowing many more filenames to fit on a screen.
  204.  
  205. The command
  206.  
  207.      looz t /new/vooz*2
  208.  
  209. will test the integrity of all Zoo archives in directory "/new" that have
  210. names beginning with the characters `vooz' and ending with the character `2',
  211. and with the default extension ".zoo".  Matching archives might be
  212. "voozexe2.zoo" and "voozsrc2.zoo".
  213.  
  214. The command
  215.  
  216.      looz x /zoo/*l* *.c *doc ^looz.c ^looz.doc
  217.  
  218. will extract all "*.c" and "*doc" files (except "looz.c" and "looz.doc") from
  219. all archives in the directory "/zoo" whose names contain the character `l',
  220. with a default extension of ".zoo" assumed in the archive names.  
  221.  
  222. The command
  223.  
  224.      looz xp /zoo/*l* *.c *doc ^looz.c ^looz.doc
  225.  
  226. is identical to the above except that extracted data are piped to standard
  227. output (normally the screen) and may be redirected to a file or device (e.g.
  228. the printer) with the MS-DOS redirection characters ">" or ">>".
  229.  
  230. The command
  231.  
  232.      looz xx /bin/r* *dir* *.doc
  233.  
  234. will search all zoo archives matching the name /bin/r*.zoo, and look in these
  235. for all files matching *dir*.com and *dir*.exe, and execute the first such
  236. file. Regardless of how many archive names and file names match the supplied
  237. pattern, the xx command will only cause the execution of the first file found
  238. with a matching name.  The string "*.doc" will be supplied as an argument to
  239. the executed program so that, for example, the result might be equivalent to
  240. typing "sdir *.doc" at the MS-DOS prompt.
  241.  
  242. The command
  243.  
  244.      looz xx run sdir /a *.doc
  245.  
  246. will search the archive run.zoo for a file called sdir.com or sdir.exe.  If
  247. found, this file will be executed, with the parameters /a and *.doc being
  248. supplied to it.  The effect will the identical to typing
  249.  
  250.      sdir /a *.doc
  251.  
  252. at the MS-DOS prompt.
  253.  
  254.  
  255.                    FEATURE SUMMARY
  256.  
  257. The table below lists differences and similarities between Ooz 1.30, Looz
  258. 1.01, and Looz 2.1.  (Symbols:  "n/a" means "not applicable";  "[1]" means
  259. "see item 1 in Notes below".)
  260.  
  261.                              Ooz 1.30        Looz 1.01       Looz 2.1
  262.                              --------        ---------       ---------
  263.  
  264. size on disk                    10K             10K             10K
  265.  
  266. memory required                 50K             96K             60K
  267. for extraction
  268.  
  269. extract archive                 yes             yes             yes
  270.  
  271. execute archived file        no        no        yes
  272.  
  273. execute                n/a        n/a        no
  274. deleted file
  275.  
  276. extract                         no              yes [1]         yes [1]
  277. deleted files
  278.  
  279. preserve file timestamp         yes             yes             yes
  280. when extracting
  281.  
  282. pipe extracted data             no              yes             yes
  283. to standard output
  284.  
  285. list archive                    no              yes             yes
  286.  
  287. multicolumn listing             n/a             no              yes
  288.  
  289. flag deleted files              n/a             yes             yes
  290.  
  291. flag files that have            n/a             yes             yes
  292. comments
  293.  
  294. list comments                   n/a             yes             yes
  295.  
  296. test archive                    no              yes             yes
  297.  
  298. wildcards in                    no              yes             yes
  299. archive name
  300.  
  301. wildcards in                    yes             yes             yes
  302. filenames
  303.  
  304. character ranges                yes             no              no
  305. in filenames
  306.  
  307. file exclusion with ^           no              yes             yes [2]
  308.  
  309. dot is special
  310. in wildcards                    yes             no [3]          no [3]
  311.  
  312. can aborting with control C     no [4]          yes             yes
  313. leave behind a partially-
  314. extracted file?
  315.  
  316. corrects filename syntax        no              yes             yes [5]
  317. so files with invalid
  318. names can be extracted
  319.  
  320. ----------
  321. NOTES
  322.  
  323. 1.   Deleted files are also extracted.  If an archived file exists occurs
  324. twice, perhaps both in deleted and not deleted form, answer "yes" or "no" to
  325. the "Overwrite?" prompt according as you want the second or the first
  326. occurrence of the file.
  327.  
  328. 2.   Filename exclusion does not apply to a filename specified for execution.
  329.  
  330. 3.   The dot IS special in wildcards in the archive name but is not special in
  331. wildcards in filenames for selection of archived files.
  332.  
  333. 4.   Except on rare occasions.
  334.  
  335. 5.   Looz 1.01 incorrectly transformed an underscore in a filename into an "r"
  336. during extraction.  Later versions handle underscores normally, like any other
  337. legal filename character.
  338.  
  339.  
  340.                    WARNING
  341.  
  342. Looz's wildcard handling is not identical to that of MS-DOS.  The dot is not
  343. special in filenames, so `*' will match all archived files but '*.*' will
  344. not.  
  345.  
  346. Please double-check to make sure the correct files are matched.
  347.  
  348.  
  349.                 ACKNOWLEDGEMENT
  350.  
  351. Thanks are due to Michael E. Devore for hearing my request for information
  352. about how to use the relocation table in EXE files and responding with a
  353. nicely-written assembly language program.  I wrote my relocation routine in C,
  354. but his program was very useful in helping me figure out how to perform the
  355. relocation.
  356.  
  357. Looz 2.1 was written using Borland's Turbo C version 1.0 and the Microsoft
  358. Macro Assembler version 4.00.
  359.  
  360.                                      -- Rahul Dhesi 1987/08/08
  361.